<template>
  <div id="app">
    <Header></Header>
    <router-view />
    <!-- v-show="$route.path == '/home' || $route.path == '/search'" -->
    <!-- 通过路由的路由原信息meta 在页面按需显示footer -->
    <Footer v-show="$route.meta.show"></Footer>
  </div>
</template>
<script>
import Header from './components/Header.vue'
import Footer from './components/Footer.vue'

export default {
  components: {
    Header,
    Footer
  },
  mounted() {
    // 派发请求事件
    this.$store.dispatch('getCategoryList')
  }
}
</script>
<style lang="less"></style>
